Skip to content

Conversation

@cpcallen
Copy link
Collaborator

@cpcallen cpcallen commented Sep 3, 2025

More work on move tests, including some tweaks to the stack block move test code added by PR #710:

  • Introduce a new appendBlock test helper, to make it easy to attach several different blocks in sequence to the same test block layout.
  • Refactor the existing statement and value block move tests to use appendBlock.

followed by completing the testing of (well-defined) constrained block movement by adding adding tests for moving complex expression blocks (ones with multiple inputs) right and left.

Fixes #696.

Creaet a new test helper appendBlock, that will create a new block
from JSON and connect it as requested.
This means the test blocks don't need to include the block(s) to be
moved.
This means the test blocks don't need to include the block(s) to be
moved, which considerably simplifies adding several more test cases.
Use an unconnected (top-level) block with two empty value inputs,
to allow us to better compare order of visiting inputs vs. outputs
of top-level blocks.
@cpcallen cpcallen requested a review from a team as a code owner September 3, 2025 13:26
@cpcallen cpcallen requested review from RoboErikG and removed request for a team September 3, 2025 13:26
Copy link
Contributor

@RoboErikG RoboErikG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM. Is the failing test (Start moving value blocks) the flaky one?

@cpcallen
Copy link
Collaborator Author

cpcallen commented Sep 4, 2025

Changes LGTM. Is the failing test (Start moving value blocks) the flaky one?

Yep.

@cpcallen cpcallen merged commit aa8ea7f into RaspberryPiFoundation:main Sep 4, 2025
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move tests: constrained movement (of connected block)

2 participants